const TableHeightFixPlugin = {
  install(Vue) {
    Vue.mixin({
      data() {
        return { tableHeight: 500 }
      },
      watch: {
        multiTab(val) {
          this.$calcTableHeight()
        }
      },
      mounted() {
        this.$calcTableHeight()
      },
      methods: {
        $calcTableHeight() {
          if (this.$refs.table) {
            this.tableHeight = this.$refs.table.$el.offsetHeight - 110
          }
        }
      }
    })
  }
}

export default TableHeightFixPlugin
